package com.atguigu10._enum;

public class t {
    public static void main(String[] args) {
Season.SPRING.show();

    }
}

interface ishow{
    void show();
}

enum Season implements ishow{    //情况一
    //必须在枚举的开头声明多个对象，对象之间用逗号隔开
    SPRING("spring","暖和"),
    SUMMER("summer","热");
    //2．声明当前类的对象的实例变量，使用private final修饰
    private final String seasonname;
    private final String seasondesc;

   private Season(String seasonname, String seasondesc) {
        this.seasonname = seasonname;
        this.seasondesc = seasondesc;
    }

    @Override
    public void show() {
        System.out.println("123");
    }
}
enum Season2 implements ishow{  //情况二
    //必须在枚举的开头声明多个对象，对象之间用逗号隔开
    SPRING("spring","暖和"){
        @Override
        public void show() {

        }
    },
    SUMMER("summer","热"){
        public void show() {

        }
    };
    //2．声明当前类的对象的实例变量，使用private final修饰
    private final String seasonname;
    private final String seasondesc;

    private Season2(String seasonname, String seasondesc) {
        this.seasonname = seasonname;
        this.seasondesc = seasondesc;
    }


}